package club.sanmubird.springboot_mysqlAndMongodb.mongodb.controller;

import club.sanmubird.springboot_mysqlAndMongodb.mongodb.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springboot-simpleMongDb
 * @description: StudentController
 * @author: sam
 * @create: 2018-07-18 23:37
 * @update: 2018-07-18 23:37
 * @update: Sam
 **/
@RestController
@RequestMapping("/student")
public class StudentController {

	@Autowired
	StudentService studentService;

	@RequestMapping("/getAllStudents")
	public String getStudent() {
		return studentService.getAllStudents().toString();
	}
}
